<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2021/10/7
  Time: 15:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>租车价格</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/brandstep.css">
    <link href="${pageContext.request.contextPath}/css/index.css" rel="stylesheet">
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/image/title-img1.png">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/index-1.css">
    <link href="${pageContext.request.contextPath}/css/footer.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css/headermenu.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/js/jquery-1.8.3.min.js" rel="script">
    <link href="${pageContext.request.contextPath}/js/brandstep.js" rel="script">
    <link href="${pageContext.request.contextPath}/js/jquery.unobtrusive-ajax.min.js">
    <link href="${pageContext.request.contextPath}/js/head.js">
    <script src="${pageContext.request.contextPath}/js/jquery-3.4.1.js"></script>
    <script type="text/javascript">
        var u=navigator.userAgent;
        if(!!u.match(/AppleWebKit.*Mobile.*/)==false&&u.indexOf('Android')==-1&&u.indexOf('iPhone')==-1&&u.indexOf('iPad')==-1){

        }
        else{
            var reqUrl=location.href;var pc=sessionStorage.getItem("pc");if(reqUrl.indexOf('mehi=F')===-1&&pc!=="1"){window.location.href="https://m.1hai.cn/"}window.sessionStorage["pc"]="1"
        }
    </script>
    <script>
        var appInsights=window.appInsights||function(config){
            function s(config){t[config]=function(){
                var i=arguments;t.queue.push(function(){
                    t[config].apply(t,i)})}}var t={config:config
                },
                r=document,f=window,e="script",o=r.createElement(e),i,u;for(o.src=config.url||"//az416426.vo.msecnd.net/scripts/a/ai.0.js",r.getElementsByTagName(e)[0].parentNode.appendChild(o),t.cookie=r.cookie,t.queue=[],i=["Event","Exception","Metric","PageView","Trace"];i.length;)s("track"+i.pop());return config.disableExceptionTracking||(i="onerror",s("_"+i),u=f[i],f[i]=function(config,r,f,e,o){var s=u&&u(config,r,f,e,o);return s!==!0&&t["_"+i](config,r,f,e,o),s}),t}({instrumentationKey:"ab058a3d-3059-c4db-9917-29e50a03cba3"});window.appInsights=appInsights;appInsights.trackPageView();
    </script>


    <style>
        .car-box .car-info p span .sel-date {
            width: 125px;
            background-position: 110px 12px;
            vertical-align: middle;
            font-family: "Microsoft YaHei", sans-serif;
            font-size: 10px;
        }
        select#PickupCity {
            height: 28px;
            border: #ccc 1px solid;
        }
    </style>
</head>
<body>
<%--${serverResponse}--%>
<header id="J-global-header" class="global-header">
    <div class="top-inner">
        <div id="sitenav" class="global-header-top-nav fn-clear">
            <div class="global-header-top-nav-right">
                <li class="top-nav-menu top-nav-menu-user-info" data-role="user-info" data-test="test">
                    <div class="top-nav-menu-handle">
                        <div class="login">
                            <%--                            <a href="${pageContext.request.contextPath}/login.jsp" class="J-login-btn" rel="nofollow" target="_self">登录/注册</a></div>--%>
                            <c:if test="${empty ServiceResponse}">
                                <a href="${pageContext.request.contextPath}/customer/login.jsp">登录/注册</a>
                            </c:if>

                            <c:if test="${!empty ServiceResponse}">
                                欢迎${ServiceResponse.data.custTelno}
                                <a href="${pageContext.request.contextPath}/logout">退出</a>
                            </c:if>
                        </div>
                    </div>
                </li>

                <li class="top-nav-menu top-nav-multi-menu top-nav-dl-app">
                    <div class="top-nav-menu-handle">
                        <i class="global-header-icon top-nav-dl-app-icon"></i>手机版
                    </div>
                    <div class="top-nav-menu-body top-nav-menu-qrcode">
                        <div class="top-nav-menu-bd-panel">
                            <div class="qrcode-img"></div>
                            <p>下载APP 领99元租车红包

                            </p>
                        </div>
                    </div>
                </li>

                <li class="top-nav-pipe">|</li>

                <li class="top-nav-menu top-nav-multi-menu top-nav-wx-guide">
                    <div class="top-nav-menu-handle"><i class="global-header-icon top-nav-wx-guide-icon"></i>微信</div>
                    <div class="top-nav-menu-body top-nav-menu-qrcode">
                        <div class="top-nav-menu-bd-panel">
                            <div class="qrcode-img"></div>
                            <p>扫一扫，关注微信</p>
                        </div>
                    </div>
                </li>
                <li class="top-nav-menu top-nav-multi-menu top-nav-order-lookup">
                    <div class="top-nav-menu-handle">订单查询<i class="top-nav-arrow"><em></em><span></span></i></div>
                    <div class="top-nav-menu-body top-nav-menu-list">
                        <div class="top-nav-menu-bd-panel">
                            <a href="${pageContext.request.contextPath}/center/myorder.jsp">订单查询</a>
                        </div>
                    </div>
                </li>
                <li class="top-nav-menu top-nav-multi-menu top-nav-order-lookup">
                    <div class="top-nav-menu-handle">个人中心<i class="top-nav-arrow"><em></em><span></span></i></div>
                    <div class="top-nav-menu-body top-nav-menu-list">
                        <div class="top-nav-menu-bd-panel">
                            <a href="${pageContext.request.contextPath}/center/user.jsp">进入个人中心</a>
                        </div>
                    </div>
                </li>
                <li class="top-nav-pipe">|</li>

            </div>

            <div class="global-header-top-nav-left">
                <div class="top-nav-menu top-nav-multi-menu top-nav-contact">
                    <div class="top-nav-menu-handle">
                        24小时客服！内地热线：110-120
                        <i class="top-nav-arrow"><em></em><span></span></i>
                    </div>
                    <div class="top-nav-menu-body top-nav-menu-list">
                        <div class="top-nav-menu-bd-panel">
                            <ul>
                                <li>
                                    <span class="title">中国内地热线</span>
                                    <a href="tel:10101020" target="_self" class="tel-number">110-120</a>
                                </li>
                            </ul>
                            <div class="top-nav-menu-bd-code">
                                <div class="qrcode-img"></div>
                                <p class="title">关注微信公众号</p>
                                <p class="text">可查询/修改/取消订单</p>
                                <a class="J-show-robot" href="javascript:" target="_self"
                                   data-tj="/公用头部/在线客服">24小时在线客服</a>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <div class="toolbar fn-clear">
        <div id="slog" class="logo fn-left">
            <a class="sbx-logo" title="思必行-租车" target="_self" href="">

            </a>
        </div>
        <div class="toolbar-site-header-nav">
            <ul class="login-page-header-nav fn-clear">
                <li><span>有驾照就能租</span></li>
                <li><span>地图导航</span></li>
                <li><span>24小时服务在线</span></li>
            </ul>
        </div>

    </div>
</header>

<!--导航-->
<div class="nav">
    <ul class="nav-wrap clear_float" id="J_NavBox">
        <li >
            <a href="${pageContext.request.contextPath}/index.jsp" target="_blank">首页</a>
            <span></span>
        </li>
        <li >
            <a href="${pageContext.request.contextPath}/selfrental/person_rentalcar.jsp" target="_blank">自驾租车</a>
            <span></span>
        </li>
        <li class="menu-index menu-index-on">
            <a href="${pageContext.request.contextPath}/car/car.jsp" target="_blank">车型查询</a>
            <span></span>
        </li>
        <li>
            <a href="${pageContext.request.contextPath}/memberrent/members.jsp" target="_blank">会员租车</a>
            <span></span>
        </li>
        <li>
            <a href="${pageContext.request.contextPath}/store/store.jsp" target="_blank">营业网点</a>
            <span></span>
        </li>
        <li>
            <a href="${pageContext.request.contextPath}/memberrent/wonderful_activity.jsp" target="_blank">精彩活动</a>
            <span></span>
        </li>
    </ul>
</div>
<div class="main-warp">
    <div class="main-box">
        <!--=====================车辆详情=======================-->
        <div class="car-box">
            <div class="car-img">
                <img src="${serverResponse.data.carImgPath}" alt="日产轩逸">
            </div>
            <form>
                <div class="car-info">
                    <div class="car-name">${serverResponse.data.carModel}</div>
                    <div class="car-des">
                        ${serverResponse.data.carColor}&nbsp;&nbsp;${serverResponse.data.carSeatnum}座&nbsp;&nbsp;${serverResponse.data.carMatic}
                    </div>
                    <p>
                            <span>
                                <b>取车城市：</b>
                                <span id="borrow-store-id" style="border: #ccc solid 1px;width: 123px;height: 28px">苏州</span>
<%--                                <select class="input-sec" id="PickupCity">--%>
<%--                                    <option>苏州 </option>--%>
<%--                                    <option>上海</option>--%>
<%--                                    <option>杭州</option>--%>
<%--                                    <option>南京</option>--%>
<%--                                    <option>丽江</option>--%>
<%--                                </select>--%>
                            </span>
                        <span>
                                <b>还车城市：</b>
                            <span id="return-store-id" style="border: #ccc solid 1px;width: 123px;height: 28px">苏州</span>
                            </span>
                    </p>
                    <p>
                            <span>
                                <b >取车时间：</b>
                               <input id="time1" class="sel-date" type="date" >
                                <input id="time2" class="sel-date" type="time">
                            </span>
                        <span>
                                <b>还车时间：</b>
                                <input id="time3" class="sel-date" type="date" >
                                <input id="time4" class="sel-date" type="time">
                            </span>
                        <input type="submit" value="查询" class="submit">

                    </p>
                </div>
            </form>
            <a class="sel-car" href="${pageContext.request.contextPath}/car/car.jsp">调整车型</a>
        </div>
        <!--=======================搜索框===============================-->
        <div class="search-box1">
            <a title="地图模式查看" class="view-map isread" id="J_ShowMap" href="javascript:;">地图模式查看</a>
            <span>查找附近门店：</span>
            <input type="text" id="J_Address" value="请输入您的位置！">
            <a class="confirm" href="javascript:;" id="J_SearchSubmit" title="确定">确定</a>
        </div>
        <!--===========================门店列表=================================-->
        <div class="store-box">
<%--            <div class="store-list clear_float">--%>
<%--                <div class="store-info" sd="松江区" st="0">--%>
<%--                    <p>--%>
<%--                        九亭店--%>
<%--                    </p>--%>
<%--                    <span>上海市松江区沪松公路1476号(靠近9号线九亭站)</span>--%>
<%--                </div>--%>

<%--                <div class="store-price">--%>

<%--                    <em>¥</em>449<i>/日均</i>--%>
<%--                </div>--%>
<%--                <div class="store-btn">--%>
<%--                    <a href="javascript:void(0)"><span class="licar-btn btnopen1" >预  订</span></a>--%>
<%--                </div>--%>
<%--            </div>--%>

        </div>
    </div>
    <div class="footer">
        <div class="website-advantage">
            <ul class="wadvantage-list">
                <li style="width: 230px">
                    <span></span>
                    <p>450多座城市</p>
                </li>
                <li style="width: 230px">
                    <span></span>
                    <p>7000多服务网点</p>
                </li>
                <li style="width: 230px">
                    <span></span>
                    <p>200余种车型</p>
                </li>
                <li style="width: 230px">
                    <span></span>
                    <p>24小时服务</p>
                </li>

            </ul>
        </div>
    </div>
</div>

<footer class="global-footer fn-clear">

    <div class="zuche-bottom-info">
        <div class="box">
            <h3>关于</h3>
            <ul>
                <li><a rel="nofollow" href="" target="_blank">关于我们</a></li>
                <li><a rel="nofollow" href="" target="_blank">联系我们</a></li>
                <li><a rel="nofollow" href="" target="_blank">加入我们</a></li>
                <li><a rel="nofollow" href="" target="_blank">媒体报道</a></li>

<%--            } else {--%>
<%--                var url = '${pageContext.request.contextPath}/myOrder?custId=' + custId + '&carId=' + carId +--%>
<%--                    '&rentStoreId=' + rentStoreId + '&giveStoreId=' + giveStoreId + '&borrowCarDate=' + borrowCarDate + '&retCarDate=' + retCarDate + '';--%>
<%--                window.location.href = url;--%>
<%--            }--%>

            </ul>
        </div>
        <div class="box">
            <h3>条款</h3>
            <ul>
                <li><a rel="nofollow" href="" target="_blank">隐私条款</a></li>
                <li><a rel="nofollow" target="_blank" href="">用户协议</a></li>
                <li><a rel="nofollow" target="_blank" href="">信息处置制度</a></li>
                <li><a rel="nofollow" target="_blank" href="">租车规则</a></li>

            </ul>
        </div>
        <div class="box">
            <h3>帮助</h3>
            <ul>
                <li><a rel="nofollow" href="" target="_blank">客服中心</a></li>
                <li><a rel="nofollow" href="" target="_blank">互助问答</a></li>
                <li><a rel="nofollow" href="" target="_blank">常见问题</a></li>
                <li><a rel="nofollow" href="" target="_blank">出游安全提示</a></li>
            </ul>
        </div>

        <div class="box box_r">
            <div class="global-footer-icon wei-img fn-right">
                <!-- <em>微<br>信<br>公<br>众<br>号</em> -->
            </div>

            <div class="fn-right zzc_phone">
                <h4 class="service-title">客服热线</h4>
                <p class="title"><span class="sub">中国内地拨打：</span>1010-1020</p>
                <p class="text"><span class="sub">其他地区拨打： </span>+86-10-6064-1387</p>
                <a class="J-show-robot" href="javascript:;" target="_self" data-tj="/公用尾部/在线客服" style="width: auto">在线客服</a>
            </div>

        </div>

        <div class="fn-clear"></div>
    </div>
    <div class="credential">
        <h3 class="credential-title">资质证书</h3>
        <ul class="credential-list">
            <li><a href="" target="_blank" rel="nofollow"><i class="icon certificate"></i></a></li>
            <li><a href="" target="_blank" rel="nofollow"><i class="icon zfb_qc"></i></a></li>
            <li><a href="" target="_blank" rel="nofollow"><i class="icon baidu_rz"></i></a></li>
            <li><a href="" target="_blank" rel="nofollow"><i class="icon shi_ming"></i></a></li>
            <li><a href="" target="_blank" rel="nofollow"><i class="icon chengxin"></i></a></li>
            <li><a href="" target="_blank" rel="nofollow"><i class="icon kexin"></i></a></li>
            <li><a id="_pingansec_bottomimagesmall_shiming" href="" target="_blank" rel="nofollow"><i class="icon trustutn"></i></a></li>
        </ul>
    </div>
    <div class="copyright-box">
        <p>© 2011-2021 sbx.com&nbsp;&nbsp;思必行有限公司&nbsp;&nbsp;版权所有&nbsp;
            <a target="_blank" href="">营业执照</a>&nbsp;&nbsp;
            <a rel="nofollow" target="_blank" href="">苏ICP备114471007328号</a>&nbsp;&nbsp;
            <a rel="nofollow" target="_blank" href="" style="position: relative;padding-left: 24px;">
                <img src="" style="position: absolute;left: 0;top: -2px;">苏公网安备 44010602045644号
            </a>
        </p>
    </div>
</footer>
<script>
    var storeId = "${serverResponse.data.storeId}"
    var url =' ${pageContext.request.contextPath}/car/brandstep'
    $.get(url,
        {
            storeId:storeId
        },
    function (result){
        console.log(JSON.stringify(result))
        var storeName = result.data.storeName;
        var storeAddress = result.data.storeAddress;
        var carPrice = ${serverResponse.data.carCategoryStartprice};
        var divEle = '<div class="store-list clear_float">\n' +
            '                <div class="store-info" sd="松江区" st="0">\n' +
            '                    <p>\n'+storeName+
            '                        \n' +
            '                    </p>\n' +
            '                    <span>'+storeAddress+'</span>\n' +
            '                </div>\n' +
            '\n' +
            '                <div class="store-price">\n' +
            '\n' +
            '                    <em>¥</em>'+carPrice+'<i>/日均</i>\n' +
            '                </div>\n' +
            '                <div id="btn" class="store-btn">\n' +
            '                    <a  href="javascript:void(0)"><span  class="licar-btn btnopen1" >预  订</span></a>\n' +
            '                </div>\n' +
            '            </div>';
        $(".store-box").append(divEle);


        $("#btn").click(function (){
            var custId = "${ServiceResponse.data.custId}";
            var carId = "${serverResponse.data.carId}";
            var rentStoreId = "${serverResponse.data.storeId}";
            var giveStoreId = "${serverResponse.data.storeId}";
            var borrowCarDate1 = $("#time1").val();
            var borrowCarDate2 = $("#time2").val();
            var retCarDate1 = $("#time3").val();
            var retCarDate2 = $("#time4").val();
            var borrowCarDate = borrowCarDate1+" "+borrowCarDate2;
            var retCarDate = retCarDate1+" "+retCarDate2;
            console.log(carId);
            console.log(rentStoreId);
            console.log(giveStoreId);
            console.log(borrowCarDate1+borrowCarDate2);
            console.log(retCarDate1+retCarDate2);
            if (new Date(borrowCarDate) <= new Date() && new Date(borrowCarDate) >= new Date(retCarDate)) {
                alert("时间选择错误，请重新选择");


        }else{
                var url = '${pageContext.request.contextPath}/myOrder?custId=' + custId + '&carId=' + carId +
                    '&rentStoreId=' + rentStoreId + '&giveStoreId=' + giveStoreId + '&borrowCarDate=' + borrowCarDate + '&retCarDate=' + retCarDate + '';
                window.location.href = url;
            }
        })



    },"json");



</script>
</body>
</html>